<?php
/**
 * Created by PhpStorm.
 * User: Short Perton
 * Date: 2016/8/29
 * Time: 17:35
 */

use Phalcon\Mvc\Application;

define('ROOT_DIR', dirname(__FILE__) . '/../');

require ROOT_DIR . 'app/config/loader.php';
try {

    require ROOT_DIR . 'app/config/service.php';

    // Handle the request
    $application = new Application($di);

    echo $application->handle()->getContent();

} catch(\Exception $e) {
    echo "PhalconException: ", $e->getMessage();
}